//
//  RTJOfflineController.m
//  RuiTaiJinProject
//
//  Created by jayson on 2018/12/5.
//  Copyright © 2018年 leewei. All rights reserved.
//

#import "RTJOfflineController.h"
#import "RTJUserInfoCommntCell.h"
#import "MHActionSheet.h"
@interface RTJOfflineController ()

@property (weak, nonatomic) IBOutlet UITableView *tab;

@end

@implementation RTJOfflineController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.navigationController.navigationBarHidden = NO;
    self.tab.tableFooterView=[UIView new];
    self.tab.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.tab.estimatedRowHeight=300;

}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 1;
    
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return UITableViewAutomaticDimension;
    
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    static NSString * ID = @"Cell";
    
    RTJUserInfoCommntCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];

        if (!cell) {
                
            cell = [[NSBundle mainBundle] loadNibNamed:@"RTJUserInfoCommntCell" owner:self options:nil][4];
                
        }
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickImage)];
    [cell.credentialsImg addGestureRecognizer:tapGesture];
    cell.credentialsImg.userInteractionEnabled = YES;
    
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    return  cell;
    
}


-(void)clickImage{
    
    MHActionSheet *actionSheet = [[MHActionSheet alloc] initSheetWithTitle:@"请选择凭证来源" style:MHSheetStyleDefault itemTitles:@[@"相册",@"相机"]];
    actionSheet.titleTextColor  = [UIColor colorForHex:@"#999999"];
    actionSheet.itemTextColor = [UIColor colorForHex:@"#007AFF"];
    actionSheet.titleTextFont= [UIFont fontWithName:@"PingFang-SC-Medium" size:13];
    actionSheet.itemTextFont= [UIFont fontWithName:@"PingFang-SC-Bold" size:20];
    
    [actionSheet didFinishSelectIndex:^(NSInteger index, NSString *title) {
 
        
    }];
}



@end
